This invention relates to a special function unit for a programmable controller which can respond quickly to the output signal of the programmable controller (hereinafter referred to merely as "a PC", when applicable).
In order to develop a PC initially provided for on-off control into one which is essential for factory automation (FA), a variety of units such as an A/D (analog-to-digital) conversion unit, D/A (digital-to-analog) unit, PID unit and positioning unit have been developed for instrumentation control. These units are referred to as "special function units". They are operated in response to output signals of a PC, to control external equipment.
FIG. 3 shows the arrangement of a programmable controller and a conventional special function unit. As shown in FIG. 3, a PC body 1 comprises a microprocessor 1a; a control memory 1b; an input/output interface 1c; a peripheral unit interface 1d. The input/output interface 1c is connected to a special function unit 2, an input unit 3, and an output unit 4. The special function unit 2 comprises a microprocessor 2a; a control memory 2b; a PC interface 2c; an external unit interface 2d; a common memory 2e which is used also by the PC 1. The external unit interface 2d is connected to an external unit 5.
The operation of the circuit thus organized will be described. The microprocessor 1a of the PC 1 applies an instruction through the input/output interface to the common memory 2e in the special function unit 2. The microprocessor 2a monitors data applied to the common memory 2e while periodically sampling it. When the instruction thus applied is detected by the microprocessor 2a, the external device 5 is controlled through the external unit interface 2d according to the instruction thus detected. The control memory 2b is provided to control the microprocessor 2a.
The conventional programmable controller special function unit being designed as described above, the time interval which elapses from the time instant that the PC 1 applies the instruction to the special function unit 2 until the external unit 5 starts is relatively long. Furthermore, since the microprocessor in the special function unit periodically samples the data applied to the common memory as was described above, the processing time is fluctuated. Therefore, it is difficult for the special function unit to make control in synchronization with other units. In the conventional system, for instance, when the PC outputs an instruction of the order of several microseconds (.mu.sec), the fluctuation with an accuracy of several tens of milliseconds (msec) occurs with the special function unit. Therefore, for instance, in the case where two positioning unit control two servo motors, respectively, it is difficult to start the latter in synchronization with each other.